<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html><!-- This web page is copied by "https://bazhan.wang" -->
<html lang="zh-CN">
<head>
    <meta charset="utf-8">

    <title>117自媒体 | 软文发布与品牌营销效果追踪平台</title>
    <meta name="keywords" content="软文发布,软文发布平台,品牌营销,品牌营销平台">
    <meta name="description" content="117营销致力打造软文发布与品牌营销效果追踪平台，帮助中小企业在营销决策，营销投放，效果追踪三个环节上，实现自动发布软文稿件，以及自动追踪品牌营销效果。">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
    <link rel="stylesheet" href="/layui/lib/layui-v2.6.3/css/layui.css" media="all">
    <link rel="stylesheet" href="/iqianfeng/css/animate.css">
    <link rel="stylesheet" href="/iqianfeng/css/swiper.min.css">
    <link rel="stylesheet" href="/iqianfeng/css/city-picker.css">
    <link rel="stylesheet" href="/iqianfeng/css/jquery.validator.css">
    <link rel="stylesheet" href="/iqianfeng/css/all.css">
    <link rel="stylesheet" href="/iqianfeng/css/common.css">
    <link rel="stylesheet" href="/iqianfeng/css/index.css">
    <link rel="icon" href="/iqianfeng/img/tubiao2.png">

    <style>
        .layui-form-label{
            width: 90px;
        }
    </style>

</head>

<body>
<header id="header"><!-- <a href="https://baogao.iqianfeng.com/" target="_blank" rel="nofollow"><img src="/public/img/zhuce.png" class="img" style="width: 100%;display: block; cursor: pointer;" ></a> -->
    <nav class="nav-fixed-top" id="pc_header">
        <div class="container">
            <div class="navbar">
                <div class="navbar-header">
                        <img class="img" src="/iqianfeng/img/tubiao1.png" alt="117营销 | 软文发布与品牌营销效果追踪平台" style="  height: 80px;width: 250px;">
                    <div class="navbar-tools">
                        <span class="icon more"></span>
                    </div>
                </div>
                <div class="navbar-mask">
                    <div class="com_header_collapse animate_3">
                        <div class="nav-mob_collapse_head">
                            <a href="/front/frontIndex" class="nav-brand">
                                <img class="img" src="/iqianfeng/img/tubiao1.png" alt="117营销 | 软文发布与品牌营销效果追踪平台">
                            </a>
                        </div>
                        <div class="com_header_collapse_ul_cont">
                            <ul class="nav navbar-nav navbar-nav-left">
                                <li class="active">
                                    <a href="/front/frontIndex" class="nav-link">首页</a>
                                </li>
                                <li class="dropdown">
                                    <a href="/front/weChat" class="dropdown-toggle nav-link linkTo" data-link="worth-section">新媒体<span class="htip-Hot">HOT</span></a>
                                </li>
                                <li class="dropdown">
                                    <a href="/front/seoserve" class="nav-link linkTo">SEO服务</a>
                                </li>
                                <li class="dropdown">
                                    <a href="/front/consulting" class="nav-link linkTo">了解117</a>
                                </li>
                            </ul>
                            <ul class="nav navbar-nav navbar-nav-right com_header_collapse_ul_cont_btns">
                                <c:if test="${advertisersAccount.phoneNum==null}">
                                    <li>
                                        <a href="/front/frontLogin" data-bd_yx="ty1" rel="nofollow" target="_top" class="nav-link spl-link">立即登录</a>
                                    </li>
                                </c:if>
                                <c:if test="${advertisersAccount.phoneNum!=null}">
                                    <li>
                                        <a href="/front/topUp" data-bd_yx="ty1" target="_top" class="nav-link spl-link">${advertisersAccount.phoneNum}</a>
                                            <%--                                        <a href="/front/frontLogin" data-bd_yx="ty1" rel="nofollow" target="_top" class="nav-link spl-link">退出登录</a>--%>
                                    </li>
                                </c:if>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </nav>

    <aside id="asideBar">
        <div class="aside-div" id="aside-tel" title="咨询电话">
            <i class="ico ico-tel"></i>
            <div class="details change-3">
                <p class="aside-title">咨询电话</p>
                <p class="aside-desc">1384383838</p>
            </div>
        </div>
        <div class="aside-div" id="aside-gzh" title="公众号">
            <i class="ico ico-gzh"></i>
            <div class="details change-3">
                <p class="aside-title text-center">关注公众号</p>
                <img src="/iqianfeng/img/weix.jpg">
            </div>
        </div>
        <div class="aside-div" id="aside-wx" title="官方微信">
            <i class="ico ico-wx"></i>
            <div class="details change-3" style="width: 0px; padding: 0px;">
                <p class="aside-title text-center">微信二维码</p>
                <img src="/iqianfeng/img/weix.jpg">
            </div>
        </div>
    </aside>
</header>
<section class="banner-section">
    <div class="banner-cont">
        <div class="banner-swiper swiper-container">
            <div class="swiper-wrapper">
                <div class="swiper-slide banner-slide4" style="height: auto">
                    <div class="container">
                        <div style="margin-top: 150px">
                            <form class="layui-form" action="">
                                <input type="hidden" name="id" id="id" value="${id}">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">投放平台</label>
                                    <div class="layui-input-block">
                                        <select name="platformId" id="platformId" style="display: none;">
                                            <c:forEach items="${contribute}" var="contributes">
                                                <option value="${contributes.id}">${contributes.name}</option>
                                            </c:forEach>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">主题</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="theme" id="theme" required  lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">品牌</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="brand" id="brand" required  lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">公司链接</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="compUrl" id="compUrl" required  lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">产品所属行业</label>
                                    <div class="layui-input-block">
                                        <select name="productType" id="productType" style="display: none;">
                                            <c:forEach items="${product}" var="products">
                                                <option value="${products.id}">${products.productName}</option>
                                            </c:forEach>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">产品名称</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="productName" id="productName" required  lay-verify="required" placeholder="请输入产品名称" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">产品详情链接</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="productUrl" id="productUrl" required  lay-verify="required" placeholder="请输入产品详情链接" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">推广需求详细</label>
                                    <div class="layui-input-block">
                                        <textarea id="detail" name="detail" style="display: none;"></textarea>
                                    </div>
                                </div>
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">资质证明</label>
                                    <div class="layui-input-block">
                                        <button type="button" name="proof" class="layui-btn" id="proof">
                                            <i class="layui-icon">&#xe67c;</i>上传图片
                                        </button>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <div class="layui-input-block">
                                        <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>



<script src="/layui/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
<script src="/iqianfeng/js/jquery.min.js"></script>
<script src="/iqianfeng/js/swiper.min.js"></script>
<script src="/iqianfeng/js/wow.min.js"></script>
<script src="/iqianfeng/js/layer.js"></script>
<script src="/iqianfeng/js/jquery.validator.js"></script>
<script src="/iqianfeng/js/city-picker.data.js"></script>
<script src="/iqianfeng/js/city-picker.js"></script>
<script src="/iqianfeng/js/common.js"></script>
<%--<script src="/iqianfeng/js/index.js"></script>--%>
<script>
</script>

<script>
    layui.use(['form', 'upload', 'layedit'], function () {
        var form = layui.form,
            layer = layui.layer,
            upload = layui.upload,
            layedit = layui.layedit,
            $ = layui.$;

        // 富文本
        layedit.set({
            uploadImage: {
                url: '/apply/file', //接口url
                type: 'post' //默认post
            }
        });

        // 上传图片
        var uploadInst = upload.render({
            elem: '#proof', //绑定元素
            url: '/apply/files', //上传接口
            done: function(res){
                //上传完毕回调
            },
            error: function(){
                //请求异常回调
            }
        });

        let htmlTag = layedit.build('detail'); //建立编辑器

        //监听提交
        form.on('submit(formDemo)', function (data) {
            var platformId = $("#platformId").val();
            var theme = $("#theme").val();
            var brand = $("#brand").val();
            var compUrl = $("#compUrl").val();
            var productType = $("#productType").val();
            var productName = $("#productName").val();
            var productUrl = $("#productUrl").val();
            var id = $("#id").val();
            $.ajax({
                url: '/apply/save',
                type: 'post',
                data: {"detail": layedit.getContent(htmlTag), "platformId": platformId, "theme": theme, "brand": brand,
                    "compUrl": compUrl, "productType": productType, "productName": productName, "productUrl": productUrl,
                    "id": id, "price": ${price}},
                <%--"id": ${id}, "price": ${price}--%>
                dataType: 'json',
                success: function (result) {
                    if (result.code == '0') {
                        layer.msg("提交成功");
                        window.location = '/front/weChat';
                    } else {
                        layer.msg("余额不足!");
                    }
                }
            });
            return false;
        });
    });
</script>

</body>

</html>
